package br.com.domain;

public class MenuItem {

	
	/**************************************************************************/
	/**                                ATRIBUTOS                             **/
	/**************************************************************************/
	
	private Integer id;		
	private String nome;
	private String page;
	private Boolean incluir;
	private Boolean alterar;
	private Boolean excluir;	
	private Boolean visivel;
	private Boolean visivelNaoTransacional;
	private Boolean checked; 			  /** USADO NO CADASTRO DE PERFIL **/
	private Boolean transacional = false; /** MENU's QUE FAZEM TRANSACAO NO BANCO ( CRUD ) **/
	
	/**************************************************************************/
	/**                              GET's E SET's                           **/
	/**************************************************************************/
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public String getPage() {
		return page;
	}
	public void setPage(String page) {
		this.page = page;
	}
	public Boolean getIncluir() {
		return incluir;
	}
	public void setIncluir(Boolean incluir) {
		this.incluir = incluir;
	}
	public Boolean getAlterar() {
		return alterar;
	}
	public void setAlterar(Boolean alterar) {
		this.alterar = alterar;
	}
	public Boolean getExcluir() {
		return excluir;
	}
	public void setExcluir(Boolean excluir) {
		this.excluir = excluir;
	}
	public Boolean getVisivel() {
		return visivel;
	}
	public void setVisivel(Boolean visivel) {
		this.visivel = visivel;
	}
	public Boolean getChecked() {
		return checked;
	}
	public void setChecked(Boolean checked) {
		this.checked = checked;
	}
	public Boolean getTransacional() {
		return transacional;
	}
	public void setTransacional(Boolean transacional) {
		this.transacional = transacional;
	}
	public Boolean getVisivelNaoTransacional() {
		return visivelNaoTransacional;
	}
	public void setVisivelNaoTransacional(Boolean visivelNaoTransacional) {
		this.visivelNaoTransacional = visivelNaoTransacional;
	}
	
	/********************************************************************/
	/**                EQUALS E HASH CODE  - RETIRAR LIST's            **/
	/********************************************************************/
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((alterar == null) ? 0 : alterar.hashCode());
		result = prime * result + ((checked == null) ? 0 : checked.hashCode());
		result = prime * result + ((excluir == null) ? 0 : excluir.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((incluir == null) ? 0 : incluir.hashCode());
		result = prime * result + ((nome == null) ? 0 : nome.hashCode());
		result = prime * result + ((page == null) ? 0 : page.hashCode());
		result = prime * result
				+ ((transacional == null) ? 0 : transacional.hashCode());
		result = prime * result + ((visivel == null) ? 0 : visivel.hashCode());
		result = prime
				* result
				+ ((visivelNaoTransacional == null) ? 0
						: visivelNaoTransacional.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MenuItem other = (MenuItem) obj;
		if (alterar == null) {
			if (other.alterar != null)
				return false;
		} else if (!alterar.equals(other.alterar))
			return false;
		if (checked == null) {
			if (other.checked != null)
				return false;
		} else if (!checked.equals(other.checked))
			return false;
		if (excluir == null) {
			if (other.excluir != null)
				return false;
		} else if (!excluir.equals(other.excluir))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (incluir == null) {
			if (other.incluir != null)
				return false;
		} else if (!incluir.equals(other.incluir))
			return false;
		if (nome == null) {
			if (other.nome != null)
				return false;
		} else if (!nome.equals(other.nome))
			return false;
		if (page == null) {
			if (other.page != null)
				return false;
		} else if (!page.equals(other.page))
			return false;
		if (transacional == null) {
			if (other.transacional != null)
				return false;
		} else if (!transacional.equals(other.transacional))
			return false;
		if (visivel == null) {
			if (other.visivel != null)
				return false;
		} else if (!visivel.equals(other.visivel))
			return false;
		if (visivelNaoTransacional == null) {
			if (other.visivelNaoTransacional != null)
				return false;
		} else if (!visivelNaoTransacional.equals(other.visivelNaoTransacional))
			return false;
		return true;
	}
	
	
	
}
